import { AliveScope } from 'react-activation'
import { Routes, Route } from 'react-router-dom'
import MainLayout from './components/layout/MainLayout'

// 页面组件
import HomePage from './pages/HomePage'
import UserPage from './pages/UserPage'
import ProductPage from './pages/ProductPage'
import OrderPage from './pages/OrderPage'
import SettingsPage from './pages/SettingsPage'

function App() {
  return (
    <AliveScope>
      <MainLayout>
        <Routes>
          <Route path="/" element={<HomePage />} />
          <Route path="/user" element={<UserPage />} />
          <Route path="/product" element={<ProductPage />} />
          <Route path="/order" element={<OrderPage />} />
          <Route path="/settings" element={<SettingsPage />} />
        </Routes>
      </MainLayout>
    </AliveScope>
  )
}

export default App 